#!/usr/bin/python3
# coding: utf-8
# file: os_.py
# 2018-06-12
import os
import time


def get_file_mtime(file):
	''' 获取文件最后更改时间 '''
	return os.stat(file).st_mtime

def get_root_dirs_files(target_dir):
	'''获取目标目录的根目录, 目录下的文件夹, 文件'''
	for root, dirs, files in os.walk(target_dir):
		print(root, dirs, files)

def os_path_join():
	'''拼接路径'''
	path = os.path.join('aaa', 'bbb', 'ccc')
	print(path)

def os_remove(file):
	'''删除文件'''
	try:
		os.remove(file)
	except WindowsError as e:
		print(e)


if __name__ == '__main__':
	# target_dir = "D:\\WorkS\\SpiderProjects\\bet_match_dev\\logs"
	# get_root_dirs_files(target_dir)
	# os_path_join()
	pass
